package com.health.warehouse.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.health.warehouse.model.entity.Warehouse;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author zhexueqi
* @description 针对表【warehouse(仓库表)】的数据库操作Mapper
* @createDate 2024-09-01 15:35:27
* @Entity generator.model.Warehouse
*/
public interface WarehouseMapper extends BaseMapper<Warehouse> {


    @Select("SELECT * FROM warehouse WHERE is_delete = 0 AND capacity < warning_threshold")
    List<Warehouse> checkLowStockItems(Integer id);

}




